Skip to content

Increasing pipe buffer size for non win32 machines#144

Merged
zanjonke merged 1 commit intomainfrom
fix/increase-pipe-buffer-size
Mar 31, 2026
Merged

Increasing pipe buffer size for non win32 machines#144
zanjonke merged 1 commit intomainfrom
fix/increase-pipe-buffer-size

Conversation

@zanjonke
Copy link
Copy Markdown
Contributor

I found an issue with running the unit testing script on Debian OS. The observation was that the script hanged within the renderer, but when I run it manually it passed within a few seconds. The investigation showed that on Debian the size of the pipe buffer is a default of 64KB and our current approach of running the test scripts resulted in a deadlock when an overflow happens leading to a 120 second timeout. On MacOs machines the size of the pipe buffer is 1MB and this PR sets this for non Win32 machines as well.

@zanjonke zanjonke self-assigned this Mar 31, 2026
@zanjonke zanjonke added the bug Something isn't working label Mar 31, 2026
@zanjonke zanjonke force-pushed the fix/increase-pipe-buffer-size branch from a200bf0 to 1ad8ff3 Compare March 31, 2026 07:15
Copy link
Copy Markdown
Contributor

@pedjaradenkovic pedjaradenkovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment thread render_machine/render_utils.py Outdated

if sys.platform != "win32":
# Set the pipe size to 1MB to avoid buffer overflows
fcntl.fcntl(proc.stdout.fileno(), F_SETPIPE_SZ, 1024 * 1024) # 1MB
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract 1024 to a constant please.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also name it F_SETPIPE_SIZE 👍

Comment thread render_machine/render_utils.py Outdated
start_new_session=(sys.platform != "win32"),
)

if sys.platform != "win32":
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change to linux

@zanjonke zanjonke force-pushed the fix/increase-pipe-buffer-size branch from 1ad8ff3 to 09808f4 Compare March 31, 2026 07:32
@zanjonke zanjonke merged commit 2a004b1 into main Mar 31, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants